# -*- coding:utf-8 -*-
# @FileName  :t12.py
# @Time      :2021/7/13 15:58
import base64
import json

import requests

kv = {'User-Agent': 'yuanrenxue.project', 'cookie': 'sessionid=g6rucx27ks07rcl39btwho0bs3td2fob'}
def jie(o):
    c = 'yuanrenxue' + str(o)
    encode_str = base64.encodebytes(c.encode('utf8'))  # b'hello world!'
    return encode_str.decode()


def main():
    for i in range(1, 6):
        t2(i)


def t2(u1):
    global num
    e = jie(u1)
    r = requests.get(f'https://match.yuanrenxue.com/api/match/12?page={u1}&m={e}',headers=kv,verify=False).text
    # input(r)
    l = json.loads(r)
    for i in l['data']:
        # print(i['value'])
        num += i['value']


if __name__ == "__main__":
    num = 0
    main()
    print(num)
